<div id="app">
    水果
        <!-- 注释 -->
        <p>
            西瓜
            <style>
                red {
                    background-color: red;
                }
            </style>
            <div style="display: none;">
                瓜子
            </div>
        </p>
    </p>
</div>
<script>


 const app = document.getElementById('app')
  const print = node => `name: ${node.nodeName} type: ${node.nodeType} value:${node.nodeValue}`
//   console.log('nodeValue',print(app))
//   console.log("nodeValue:", print(app.childNodes[0]));
//   console.log("nodeValue:", print(app.childNodes[1]));
  console.log("innerText", app.innerText);
//   console.log('innerHTML',app.innerHTML)
  console.log("textContent", app.textContent);
</script>
